package com.jiulan.hearthearing.ui.course.adapter;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiulan.hearthearing.R;
import com.jiulan.hearthearing.ui.course.model.CourseDetailsHudongModel;
import com.shehuan.niv.NiceImageView;

import java.util.List;

public class CourseDetailsHudongAdapter extends BaseQuickAdapter<CourseDetailsHudongModel.DataBean, BaseViewHolder> {
    public CourseDetailsHudongAdapter(List<CourseDetailsHudongModel.DataBean> data) {
        super(R.layout.item_course_details_hudong, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CourseDetailsHudongModel.DataBean item) {
        NiceImageView nivHeadPhoto = helper.getView(R.id.nivHeadPhoto);
        Glide.with(mContext).load(item.getAvatar()).into(nivHeadPhoto);
        helper.setText(R.id.tvNickname, item.getNickname());
        helper.setText(R.id.tvTime, item.getAdd_time());
        helper.setText(R.id.tvCommentContent, item.getContent());
        helper.setText(R.id.tvDianzanNum, String.valueOf(item.getSupport()));

    }
}
